package com.dabao.util;

import org.apache.commons.lang.time.FastDateFormat;

import java.util.Date;

/**
 * Created by kakalee on 16/4/16.
 */
public class DateUtils {

    private final static FastDateFormat TIME_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd HH:mm");

    private final static FastDateFormat DAY_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd");

    public static String formatTime(Date date) {
        return TIME_FORMAT.format(date);
    }

    public static String formatDay(Date date) {
        return DAY_FORMAT.format(date);
    }
}
